// 客户端应用程序
public class Application {
    private Button button;
    private Checkbox checkbox;

    // 通过工厂来创建按钮和复选框
    public Application(GUIFactory factory) {
        this.button = factory.createButton();
        this.checkbox = factory.createCheckbox();
    }

    // 渲染 UI 控件
    public void render() {
        button.render();
        checkbox.render();
    }
}
